﻿using System;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Runtime.CompilerServices;
using AutoR.ViewModels;
using Prism.Mvvm;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
using Xamarin.Forms.Xaml.Internals;

namespace AutoR.Views
{
	// Token: 0x0200000E RID: 14
	[XamlFilePath("Views\\OnLineTask.xaml")]
	public class OnLineTask : ContentPage
	{
		// Token: 0x06000051 RID: 81 RVA: 0x0000522A File Offset: 0x0000342A
		public OnLineTask()
		{
			this.InitializeComponent();
		}

		// Token: 0x06000052 RID: 82 RVA: 0x00005238 File Offset: 0x00003438
		private void Picker_OnSelectedIndexChanged(object sender, EventArgs e)
		{
			OnLineTaskViewModel onLineTaskViewModel = (OnLineTaskViewModel)base.BindingContext;
			if (onLineTaskViewModel == null)
			{
				return;
			}
			onLineTaskViewModel.GetList();
		}

		// Token: 0x06000053 RID: 83 RVA: 0x00005250 File Offset: 0x00003450
		[GeneratedCode("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
		private void InitializeComponent()
		{
			if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(OnLineTask).GetTypeInfo().Assembly.GetName(), "Views/OnLineTask.xaml") != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			BindingExtension bindingExtension = new BindingExtension();
			ToolbarItem toolbarItem = new ToolbarItem();
			Label label = new Label();
			BindingExtension bindingExtension2 = new BindingExtension();
			string item = "全部";
			string item2 = "练级";
			string item3 = "资源";
			string item4 = "打捞";
			string item5 = "活动";
			string item6 = "其他";
			Picker picker = new Picker();
			StackLayout stackLayout = new StackLayout();
			BindingExtension bindingExtension3 = new BindingExtension();
			BindingExtension bindingExtension4 = new BindingExtension();
			DataTemplate dataTemplate = new DataTemplate();
			ListView listView = new ListView();
			StackLayout stackLayout2 = new StackLayout();
			NameScope nameScope = new NameScope();
			NameScope.SetNameScope(this, nameScope);
			((INameScope)nameScope).RegisterName("OLList", listView);
			if (listView.StyleId == null)
			{
				listView.StyleId = "OLList";
			}
			this.OLList = listView;
			this.SetValue(ViewModelLocator.AutowireViewModelProperty, new bool?(true));
			this.SetValue(Page.TitleProperty, "在线配置");
			toolbarItem.SetValue(MenuItem.TextProperty, "确定");
			bindingExtension.Path = "OKCommand";
			BindingBase binding = ((IMarkupExtension<BindingBase>)bindingExtension).ProvideValue(null);
			toolbarItem.SetBinding(MenuItem.CommandProperty, binding);
			this.ToolbarItems.Add(toolbarItem);
			stackLayout.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
			stackLayout.SetValue(View.HorizontalOptionsProperty, LayoutOptions.EndAndExpand);
			label.SetValue(Label.TextProperty, "筛选： ");
			label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
			stackLayout.Children.Add(label);
			bindingExtension2.Path = "Type";
			BindingBase binding2 = ((IMarkupExtension<BindingBase>)bindingExtension2).ProvideValue(null);
			picker.SetBinding(Picker.SelectedIndexProperty, binding2);
			picker.SelectedIndexChanged += this.Picker_OnSelectedIndexChanged;
			picker.Items.Add(item);
			picker.Items.Add(item2);
			picker.Items.Add(item3);
			picker.Items.Add(item4);
			picker.Items.Add(item5);
			picker.Items.Add(item6);
			stackLayout.Children.Add(picker);
			stackLayout2.Children.Add(stackLayout);
			bindingExtension3.Path = "List";
			BindingBase binding3 = ((IMarkupExtension<BindingBase>)bindingExtension3).ProvideValue(null);
			listView.SetBinding(ItemsView<Cell>.ItemsSourceProperty, binding3);
			listView.SetValue(ListView.HasUnevenRowsProperty, true);
			listView.SetValue(View.VerticalOptionsProperty, LayoutOptions.FillAndExpand);
			bindingExtension4.Path = "Select";
			BindingBase binding4 = ((IMarkupExtension<BindingBase>)bindingExtension4).ProvideValue(null);
			listView.SetBinding(ListView.SelectedItemProperty, binding4);
			IDataTemplate dataTemplate2 = dataTemplate;
			OnLineTask.<InitializeComponent>_anonXamlCDataTemplate_22 <InitializeComponent>_anonXamlCDataTemplate_ = new OnLineTask.<InitializeComponent>_anonXamlCDataTemplate_22();
			object[] array = new object[0 + 4];
			array[0] = dataTemplate;
			array[1] = listView;
			array[2] = stackLayout2;
			array[3] = this;
			<InitializeComponent>_anonXamlCDataTemplate_.parentValues = array;
			<InitializeComponent>_anonXamlCDataTemplate_.root = this;
			dataTemplate2.LoadTemplate = new Func<object>(<InitializeComponent>_anonXamlCDataTemplate_.LoadDataTemplate);
			listView.SetValue(ItemsView<Cell>.ItemTemplateProperty, dataTemplate);
			stackLayout2.Children.Add(listView);
			this.SetValue(ContentPage.ContentProperty, stackLayout2);
		}

		// Token: 0x06000054 RID: 84 RVA: 0x000055AB File Offset: 0x000037AB
		private void __InitComponentRuntime()
		{
			this.LoadFromXaml(typeof(OnLineTask));
			this.OLList = this.FindByName("OLList");
		}

		// Token: 0x0400002A RID: 42
		[GeneratedCode("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
		private ListView OLList;

		// Token: 0x0200000F RID: 15
		[CompilerGenerated]
		private sealed class <InitializeComponent>_anonXamlCDataTemplate_22
		{
			// Token: 0x06000056 RID: 86 RVA: 0x000055E4 File Offset: 0x000037E4
			internal object LoadDataTemplate()
			{
				Label label = new Label();
				BindingExtension bindingExtension = new BindingExtension();
				Label label2 = new Label();
				Label label3 = new Label();
				BindingExtension bindingExtension2 = new BindingExtension();
				Label label4 = new Label();
				Label label5 = new Label();
				BindingExtension bindingExtension3 = new BindingExtension();
				Label label6 = new Label();
				StackLayout stackLayout = new StackLayout();
				Label label7 = new Label();
				BindingExtension bindingExtension4 = new BindingExtension();
				Label label8 = new Label();
				Label label9 = new Label();
				BindingExtension bindingExtension5 = new BindingExtension();
				Label label10 = new Label();
				StackLayout stackLayout2 = new StackLayout();
				BindingExtension bindingExtension6 = new BindingExtension();
				Label label11 = new Label();
				ReferenceExtension referenceExtension = new ReferenceExtension();
				BindingExtension bindingExtension7 = new BindingExtension();
				BindingExtension bindingExtension8 = new BindingExtension();
				TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();
				Image image = new Image();
				BindingExtension bindingExtension9 = new BindingExtension();
				Label label12 = new Label();
				ReferenceExtension referenceExtension2 = new ReferenceExtension();
				BindingExtension bindingExtension10 = new BindingExtension();
				BindingExtension bindingExtension11 = new BindingExtension();
				TapGestureRecognizer tapGestureRecognizer2 = new TapGestureRecognizer();
				Image image2 = new Image();
				BindingExtension bindingExtension12 = new BindingExtension();
				Label label13 = new Label();
				StackLayout stackLayout3 = new StackLayout();
				StackLayout stackLayout4 = new StackLayout();
				Frame frame = new Frame();
				ViewCell viewCell = new ViewCell();
				NameScope nameScope = new NameScope();
				NameScope.SetNameScope(viewCell, nameScope);
				frame.SetValue(View.MarginProperty, new Thickness(2.0));
				frame.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(2.0));
				stackLayout4.SetValue(StackLayout.SpacingProperty, 0.0);
				stackLayout4.SetValue(VisualElement.BackgroundColorProperty, Color.Ivory);
				stackLayout.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
				label.SetValue(Label.TextProperty, "作者:");
				label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				label.SetValue(Label.FontAttributesProperty, new FontAttributesConverter().ConvertFromInvariantString("Bold"));
				stackLayout.Children.Add(label);
				bindingExtension.Path = "author";
				BindingBase binding = ((IMarkupExtension<BindingBase>)bindingExtension).ProvideValue(null);
				label2.SetBinding(Label.TextProperty, binding);
				label2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				stackLayout.Children.Add(label2);
				label3.SetValue(Label.TextProperty, "名称:");
				label3.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				label3.SetValue(View.MarginProperty, new Thickness(5.0, 0.0, 0.0, 0.0));
				label3.SetValue(Label.FontAttributesProperty, new FontAttributesConverter().ConvertFromInvariantString("Bold"));
				stackLayout.Children.Add(label3);
				bindingExtension2.Path = "name";
				BindingBase binding2 = ((IMarkupExtension<BindingBase>)bindingExtension2).ProvideValue(null);
				label4.SetBinding(Label.TextProperty, binding2);
				label4.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				stackLayout.Children.Add(label4);
				label5.SetValue(Label.TextProperty, "节点:");
				label5.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				label5.SetValue(View.MarginProperty, new Thickness(5.0, 0.0, 0.0, 0.0));
				label5.SetValue(Label.FontAttributesProperty, new FontAttributesConverter().ConvertFromInvariantString("Bold"));
				stackLayout.Children.Add(label5);
				bindingExtension3.Path = "node";
				BindingBase binding3 = ((IMarkupExtension<BindingBase>)bindingExtension3).ProvideValue(null);
				label6.SetBinding(Label.TextProperty, binding3);
				label6.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				stackLayout.Children.Add(label6);
				stackLayout4.Children.Add(stackLayout);
				stackLayout2.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
				label7.SetValue(Label.TextProperty, "上传时间:");
				label7.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				label7.SetValue(Label.FontAttributesProperty, new FontAttributesConverter().ConvertFromInvariantString("Bold"));
				stackLayout2.Children.Add(label7);
				bindingExtension4.Path = "time";
				BindingBase binding4 = ((IMarkupExtension<BindingBase>)bindingExtension4).ProvideValue(null);
				label8.SetBinding(Label.TextProperty, binding4);
				label8.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				stackLayout2.Children.Add(label8);
				label9.SetValue(Label.TextProperty, "类型:");
				label9.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				label9.SetValue(View.MarginProperty, new Thickness(5.0, 0.0, 0.0, 0.0));
				label9.SetValue(Label.FontAttributesProperty, new FontAttributesConverter().ConvertFromInvariantString("Bold"));
				stackLayout2.Children.Add(label9);
				bindingExtension5.Path = "ClassifyName";
				BindingBase binding5 = ((IMarkupExtension<BindingBase>)bindingExtension5).ProvideValue(null);
				label10.SetBinding(Label.TextProperty, binding5);
				label10.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				stackLayout2.Children.Add(label10);
				stackLayout4.Children.Add(stackLayout2);
				bindingExtension6.Path = "memo";
				BindingBase binding6 = ((IMarkupExtension<BindingBase>)bindingExtension6).ProvideValue(null);
				label11.SetBinding(Label.TextProperty, binding6);
				label11.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				label11.SetValue(View.MarginProperty, new Thickness(0.0, 0.0, 0.0, 5.0));
				stackLayout4.Children.Add(label11);
				stackLayout3.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
				image.SetValue(Image.SourceProperty, new ImageSourceConverter().ConvertFromInvariantString("cai.png"));
				image.SetValue(VisualElement.HeightRequestProperty, 18.0);
				image.SetValue(VisualElement.WidthRequestProperty, 18.0);
				image.SetValue(View.HorizontalOptionsProperty, LayoutOptions.EndAndExpand);
				referenceExtension.Name = "OLList";
				IMarkupExtension markupExtension = referenceExtension;
				XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
				Type typeFromHandle = typeof(IProvideValueTarget);
				int length;
				object[] array = new object[(length = this.parentValues.Length) + 7];
				Array.Copy(this.parentValues, 0, array, 7, length);
				object[] array2 = array;
				array2[0] = bindingExtension7;
				array2[1] = tapGestureRecognizer;
				array2[2] = image;
				array2[3] = stackLayout3;
				array2[4] = stackLayout4;
				array2[5] = frame;
				array2[6] = viewCell;
				object service;
				xamlServiceProvider.Add(typeFromHandle, service = new SimpleValueTargetProvider(array2, typeof(BindingExtension).GetRuntimeProperty("Source"), nameScope));
				xamlServiceProvider.Add(typeof(IReferenceProvider), service);
				Type typeFromHandle2 = typeof(IXamlTypeResolver);
				XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();
				xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
				xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
				xmlNamespaceResolver.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
				xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(OnLineTask.<InitializeComponent>_anonXamlCDataTemplate_22).GetTypeInfo().Assembly));
				xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(54, 67)));
				object source = markupExtension.ProvideValue(xamlServiceProvider);
				bindingExtension7.Source = source;
				bindingExtension7.Path = "BindingContext.DingCommand";
				BindingBase binding7 = ((IMarkupExtension<BindingBase>)bindingExtension7).ProvideValue(null);
				tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandProperty, binding7);
				BindingBase binding8 = ((IMarkupExtension<BindingBase>)bindingExtension8).ProvideValue(null);
				tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandParameterProperty, binding8);
				image.GestureRecognizers.Add(tapGestureRecognizer);
				stackLayout3.Children.Add(image);
				bindingExtension9.Path = "ding";
				BindingBase binding9 = ((IMarkupExtension<BindingBase>)bindingExtension9).ProvideValue(null);
				label12.SetBinding(Label.TextProperty, binding9);
				stackLayout3.Children.Add(label12);
				image2.SetValue(Image.SourceProperty, new ImageSourceConverter().ConvertFromInvariantString("ding.png"));
				image2.SetValue(VisualElement.HeightRequestProperty, 18.0);
				image2.SetValue(VisualElement.WidthRequestProperty, 18.0);
				image2.SetValue(View.MarginProperty, new Thickness(10.0, 0.0, 0.0, 0.0));
				referenceExtension2.Name = "OLList";
				IMarkupExtension markupExtension2 = referenceExtension2;
				XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
				Type typeFromHandle3 = typeof(IProvideValueTarget);
				int length2;
				object[] array3 = new object[(length2 = this.parentValues.Length) + 7];
				Array.Copy(this.parentValues, 0, array3, 7, length2);
				object[] array4 = array3;
				array4[0] = bindingExtension10;
				array4[1] = tapGestureRecognizer2;
				array4[2] = image2;
				array4[3] = stackLayout3;
				array4[4] = stackLayout4;
				array4[5] = frame;
				array4[6] = viewCell;
				object service2;
				xamlServiceProvider2.Add(typeFromHandle3, service2 = new SimpleValueTargetProvider(array4, typeof(BindingExtension).GetRuntimeProperty("Source"), nameScope));
				xamlServiceProvider2.Add(typeof(IReferenceProvider), service2);
				Type typeFromHandle4 = typeof(IXamlTypeResolver);
				XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();
				xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
				xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
				xmlNamespaceResolver2.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
				xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(OnLineTask.<InitializeComponent>_anonXamlCDataTemplate_22).GetTypeInfo().Assembly));
				xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(60, 67)));
				object source2 = markupExtension2.ProvideValue(xamlServiceProvider2);
				bindingExtension10.Source = source2;
				bindingExtension10.Path = "BindingContext.TreadCommand";
				BindingBase binding10 = ((IMarkupExtension<BindingBase>)bindingExtension10).ProvideValue(null);
				tapGestureRecognizer2.SetBinding(TapGestureRecognizer.CommandProperty, binding10);
				BindingBase binding11 = ((IMarkupExtension<BindingBase>)bindingExtension11).ProvideValue(null);
				tapGestureRecognizer2.SetBinding(TapGestureRecognizer.CommandParameterProperty, binding11);
				image2.GestureRecognizers.Add(tapGestureRecognizer2);
				stackLayout3.Children.Add(image2);
				bindingExtension12.Path = "tread";
				BindingBase binding12 = ((IMarkupExtension<BindingBase>)bindingExtension12).ProvideValue(null);
				label13.SetBinding(Label.TextProperty, binding12);
				stackLayout3.Children.Add(label13);
				stackLayout4.Children.Add(stackLayout3);
				frame.SetValue(ContentView.ContentProperty, stackLayout4);
				viewCell.View = frame;
				return viewCell;
			}

			// Token: 0x0400002B RID: 43
			internal object[] parentValues;

			// Token: 0x0400002C RID: 44
			internal OnLineTask root;
		}
	}
}
